package com.yunji.cabinet.context.convert;

import com.yunji.base.vo.UpgradeFileVO;
import com.yunji.cabinet.domain.UpgradeFileDO;
import com.yunji.common.utils.bean.BeanUtils;

import java.util.ArrayList;
import java.util.List;

public class UpgradeFileConvert {

    public static List<UpgradeFileVO> domainTOVOList(List<UpgradeFileDO> list){
        List<UpgradeFileVO> voList = new ArrayList<>();
        list.forEach(item->{
            UpgradeFileVO vo = domainTOVO(item);
            voList.add(vo);
        });
        return voList;
    }

    public static UpgradeFileVO domainTOVO(UpgradeFileDO domain){
        UpgradeFileVO vo = new UpgradeFileVO();
        BeanUtils.clone(domain,vo);
        return vo;
    }
}
